package com.k1998.mybatis.controller;


import com.k1998.mybatis.bean.AccountUser;
import com.k1998.mybatis.dao.IAccountDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class AccountController {
    @Autowired
    private IAccountDao iAccountDao;

    @RequestMapping("/findallaccount")
    public List<AccountUser> getAll() {
    List<AccountUser> accounts = iAccountDao.findAllAcount();
    return accounts;
    }

}
